<template>
	<scroll-list class="scroll-list" @loadmore="loadmore">
		<view>
			<card-list :item='item' v-for="(item,index) in list" :key="item._id"></card-list>
		</view>
		<uni-load-more v-if="list.length === 0 || list.length > 9" :status="load.loading || 'loading'" iconType="snow"></uni-load-more>
	</scroll-list>
</template>

<script>
	export default {
		props: {
			list: {
				type: Array,
				default () {
					return []
				}
			},
			load: {
				type: Object,
				default () {
					return {
						loading: 'loading'
					}
				}
			}
		},
		methods: {
			loadmore() {
				this.$emit("loadmore")
			}
		}
	}
</script>

<style lang="scss" scoped>
	.scroll-list {
		height: 100%;
	}
</style>
